#!/bin/ksh
while read QUEUE COUNTERS; do
	echo "generic,d,q-$QUEUE,0,U,$COUNTERS"
done <<- EOF
	$(pfctl -vs queue | awk -- '$1 ~ /queue/ {name=$2} $2 ~ /pkts/ {queues[name]=$5} END {for (queue in queues) print queue,queues[queue]}')
EOF